package com.cyp.orderservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "product-service")
public interface OrderClient {
    @GetMapping("/product/demo")
    String demo();
    @GetMapping("/product/getProductList")
    String getProductList();
    @GetMapping("/product/getProductById")
    String getProductById(@RequestParam("id")Long id);

    /**
     *
     * @param quantity 库存
     * @param id
     * @param userId
     * @return
     */
    @GetMapping("/product/updateProduct")
    Integer updateProduct(@RequestParam("quantity")int quantity,@RequestParam("id")Long id,@RequestParam("userId")Long userId);
    @GetMapping("/product/getRedis")
    List<Map<String, Object>> getRedis();
}
